import Vue from 'vue'
import VueRouter from 'vue-router'
import routes from './router'

Vue.use(VueRouter)

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})
// 路由前置守卫，可以在此判断token
router.beforeEach((to, from, next) => {
  next()
})

/*
*/
export default router
